//
//  ShareHelper.m
//  ShareTest2
//
//  Created by leeqb on 12/12/15.
//  Copyright © 2015 powerlee. All rights reserved.
//

#import "ShareHelper.h"

@implementation ShareHelper

+ (void)wxFriendShare:(UIViewController *)vc content:(NSString *)content image:(UIImage *)image
{
    [[UMSocialDataService defaultDataService] postSNSWithTypes:@[UMShareToWechatSession] content:content image:image location:nil urlResource:nil presentedController:vc completion:^(UMSocialResponseEntity *response){
        if (response.responseCode == UMSResponseCodeSuccess) {
            NSLog(@"分享成功！");
        }
    }];
}

+ (void)wxCircleShare:(UIViewController *)vc content:(NSString *)content image:(UIImage *)image
{
    [[UMSocialDataService defaultDataService] postSNSWithTypes:@[UMShareToWechatTimeline] content:content image:image location:nil urlResource:nil presentedController:vc completion:^(UMSocialResponseEntity *response){
        if (response.responseCode == UMSResponseCodeSuccess) {
            NSLog(@"分享成功！");
        }
    }];
}

+ (void)qqShare:(UIViewController *)vc content:(NSString *)content image:(UIImage *)image
{
    [[UMSocialDataService defaultDataService] postSNSWithTypes:@[UMShareToQQ] content:content image:image location:nil urlResource:nil presentedController:vc completion:^(UMSocialResponseEntity *response){
        if (response.responseCode == UMSResponseCodeSuccess) {
            NSLog(@"分享成功！");
        }
    }];
}

+ (void)sinaShare:(UIViewController *)vc content:(NSString *)content image:(UIImage *)image
{
    [[UMSocialDataService defaultDataService] postSNSWithTypes:@[UMShareToSina] content:content image:image location:nil urlResource:nil presentedController:vc completion:^(UMSocialResponseEntity *response){
        if (response.responseCode == UMSResponseCodeSuccess) {
            NSLog(@"分享成功！");
        }
    }];
}

+ (void)smsShare:(UIViewController *)vc content:(NSString *)content
{
    [[UMSocialDataService defaultDataService]  postSNSWithTypes:@[UMShareToSms] content:content image:nil location:nil urlResource:nil presentedController:vc completion:^(UMSocialResponseEntity *response){
        if (response.responseCode == UMSResponseCodeSuccess) {
            NSLog(@"分享成功！");
        }
    }];
}

@end
